Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Sep 6, 2025

This PR implements the feature requested in #7738 to schedule messages for after task completion.

Summary

Added the ability to schedule messages to be sent after the current task completes by right-clicking on the Send button. This allows users to queue up new tasks while Roo is still working on the current task.

Changes

  • Added a dropdown menu to the Send button in ChatTextArea.tsx that appears on right-click
  • Implemented two options: "Send message" (immediate) and "Schedule for after task completion"
  • Updated the QueuedMessages component to display scheduled messages with a clock icon
  • Added necessary translations to the English locale file
  • Leveraged existing MessageQueueService infrastructure for managing queued messages

Testing

  • All existing tests pass
  • TypeScript compilation successful
  • Manually tested the right-click functionality

Screenshots

The implementation adds a context menu when right-clicking the Send button, allowing users to either send immediately or schedule for after task completion. Scheduled messages appear in the queue with a clock icon indicator.

Fixes #7738


Important

Adds message scheduling feature via right-click on Send button, with UI updates in ChatTextArea.tsx and translation updates across multiple locale files.

  • Behavior:
    • Adds right-click dropdown to Send button in ChatTextArea.tsx with options to send immediately or schedule for after task completion.
    • Updates QueuedMessages component to display scheduled messages with a clock icon.
  • Translations:
    • Adds translations for new scheduling feature in multiple locale files including ca/chat.json, de/chat.json, and en/chat.json.
  • Misc:
    • Utilizes existing MessageQueueService for managing queued messages.

This description was created by Ellipsis for 269a89b. You can customize this summary. It will automatically update as commits are pushed.

- Added dropdown menu to Send button with scheduling option
- Right-click or dropdown opens menu with 'Send message' and 'Schedule for after task completion' options
- Updated QueuedMessages component to show scheduled messages with clock icon
- Added translations for new scheduling feature
- Messages can be scheduled to send automatically after current task completes

Fixes #7738
@roomote roomote bot requested review from cte, jr and mrubens as code owners September 6, 2025 15:35
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Sep 6, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing my own code is like debugging in production - technically possible but morally questionable.

<SendHorizontal className="w-4 h-4" />
</button>
</StandardTooltip>
<DropdownMenu>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing test coverage for this new dropdown functionality. Could we add tests to ensure the right-click behavior and message queueing work as expected?

<button
aria-label={t("chat:sendMessage")}
disabled={false}
onContextMenu={(e) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this accessible to keyboard-only users? The right-click context menu might not be discoverable or usable without a mouse. Could we consider adding a keyboard shortcut or making the dropdown accessible via keyboard navigation?

onContextMenu={(e) => {
e.preventDefault()
// Trigger dropdown on right-click
const event = new MouseEvent("click", {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indirect approach of dispatching a synthetic click event feels a bit hacky. Would it be cleaner to show the dropdown directly on right-click using the dropdown's API, or use a proper context menu library?

<div className="text-vscode-descriptionForeground text-md mb-2">{t("queuedMessages.title")}</div>
<div className="text-vscode-descriptionForeground text-md mb-2">
<span className="codicon codicon-clock mr-2" />
{t("queuedMessages.scheduledTitle")}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this title always accurate? The component shows 'Scheduled for after task completion' regardless of whether messages are actually scheduled or just queued. Should this be conditional based on the actual queue state?

// Queue the message for after task completion
if (inputValue.trim() || selectedImages.length > 0) {
vscode.postMessage({
type: "queueMessage",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message structure with 'text' and 'images' properties doesn't appear to be strongly typed. Could we improve type safety by properly typing the WebviewMessage for queueMessage?

Added placeholder English translations for the new scheduling feature keys to all locale files to fix CI check-translations failure
"didRun": "Roo uruchomił komendę slash:"
}
},
"scheduleForAfterTask": "Schedule for after task completion",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new keys 'scheduleForAfterTask' and 'scheduledTitle' are set to "Schedule for after task completion" in English. These keys appear across all locales without proper translation to Polish. Please provide appropriate localized text or add a comment explaining the rationale for keeping them in English.

Suggested change
"scheduleForAfterTask": "Schedule for after task completion",
"scheduleForAfterTask": "Zaplanuj po zakończeniu zadania",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"enhancePrompt": "Migliora prompt con contesto aggiuntivo",
"addImages": "Aggiungi immagini al messaggio",
"sendMessage": "Invia messaggio",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value for the key 'sendMessage' has been changed to the English string "Send message". This overrides the previously localized Italian text. Confirm whether this is intentional—if not, please restore the Italian translation.

Suggested change
"sendMessage": "Send message",
"sendMessage": "Invia messaggio",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"enhancePrompt": "Millora la sol·licitud amb context addicional",
"addImages": "Afegeix imatges al missatge",
"sendMessage": "Envia el missatge",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value for the key "sendMessage" is in English ("Send message") while the localization for Catalan expects a Catalan translation (for example, "Envia el missatge"). Please verify if this change was intentional.

Suggested change
"sendMessage": "Send message",
"sendMessage": "Envia el missatge",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"enhancePrompt": "Prompt mit zusätzlichem Kontext verbessern",
"addImages": "Bilder zur Nachricht hinzufügen",
"sendMessage": "Nachricht senden",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typographical issue: The text for "sendMessage" is in English ('Send message') while the rest of the entries are in German. Please confirm if this change is intentional or if it should be corrected to the German translation.

Suggested change
"sendMessage": "Send message",
"sendMessage": "Nachricht senden",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"enhancePrompt": "Mejorar el mensaje con contexto adicional",
"addImages": "Agregar imágenes al mensaje",
"sendMessage": "Enviar mensaje",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value for "sendMessage" is now in English in a Spanish locale file ("Send message"). Please confirm if this is intentional or if it should be translated (e.g., "Enviar mensaje").

Suggested change
"sendMessage": "Send message",
"sendMessage": "Enviar mensaje",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"enhancePrompt": "अतिरिक्त संदर्भ के साथ प्रॉम्प्ट बढ़ाएँ",
"addImages": "संदेश में चित्र जोड़ें",
"sendMessage": "संदेश भेजें",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The translation for 'sendMessage' remains in English ("Send message") in a Hindi locale file. Please confirm if this is intentional or if it should be translated.

Suggested change
"sendMessage": "Send message",
"sendMessage": "संदेश भेजें",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"enhancePrompt": "追加コンテキストでプロンプトを強化",
"addImages": "メッセージに画像を追加",
"sendMessage": "メッセージを送信",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo check: The 'sendMessage' value is now set to "Send message" in a file that otherwise contains Japanese text. Please confirm if this is intentional or if it should be reverted to the Japanese translation.

Suggested change
"sendMessage": "Send message",
"sendMessage": "メッセージを送信",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"enhancePrompt": "Aprimorar prompt com contexto adicional",
"addImages": "Adicionar imagens à mensagem",
"sendMessage": "Enviar mensagem",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: The value for "sendMessage" appears in English ("Send message") in a Portuguese locale file. It should probably be translated (e.g., "Enviar mensagem") for consistency with the rest of the file.

Suggested change
"sendMessage": "Send message",
"sendMessage": "Enviar mensagem",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

},
"addImages": "Добавить изображения к сообщению",
"sendMessage": "Отправить сообщение",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The locale file is for Russian language, but the text for sendMessage is in English ('Send message'). If this is a localization file it might be a mistake. Consider reverting to the appropriate Russian translation (e.g., 'Отправить сообщение') for consistency.

Suggested change
"sendMessage": "Send message",
"sendMessage": "Отправить сообщение",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"enhancePrompt": "Ek bağlamla istemi geliştir",
"addImages": "Mesaja resim ekle",
"sendMessage": "Mesaj gönder",
"sendMessage": "Send message",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changed text for the "sendMessage" key reads "Send message", which is in English while the rest of the Turkish locale file contains Turkish text. Please update this string to the appropriate Turkish translation (e.g., "Mesaj gönder").

Suggested change
"sendMessage": "Send message",
"sendMessage": "Mesaj gönder",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 6, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Sep 8, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to Triage in Roo Code Roadmap Sep 8, 2025
@daniel-lxs
Copy link
Member

Closing, see #7738 (comment)

@daniel-lxs daniel-lxs closed this Sep 8, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 8, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Sep 8, 2025
@daniel-lxs daniel-lxs deleted the feature/schedule-message-after-task branch September 8, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Schedule message for after conversation finished

4 participants